import Vue from "vue";
import VueRouter from "vue-router";

import List from "./views/List.vue";
import Info from "./views/Info.vue";

Vue.use(VueRouter);

// 实例化路由器实例对象
const router = new VueRouter({
  // 配置路由表
  routes: [
    {
      name: "list",
      path: "/list",
      component: List,
    },
    {
      name: "detail",
      path: "/detail",
      component: Info,
    },
  ],
});

export default router;
